Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle purges dropped temp tables #17506

Merged
merged 1 commit into from
May 16, 2023
Merged

Conversation

mwd410
Copy link
Contributor

@mwd410 mwd410 commented May 15, 2023

Description

This is in response to #16277

The issue appears to be due to Oracle's recycling bin, which holds onto dropped tables for a period of time.

This has caused issues in our BaseFailureRecoveryTest, which expects there to be no remaining temporary tables after each test case. The solution implemented here is to PURGE trino's temporary tables (tmp_trino_*), which bypasses the recycling bin, dropping the table immediately.

We could PURGE all dropped tables, but this code path is also used when an end user explicitly drops one of their own tables, so that may be unexpected behavior.

Additional context and related issues

Release notes

(X) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@@ -296,6 +297,19 @@ public void dropSchema(ConnectorSession session, String schemaName)
throw new TrinoException(NOT_SUPPORTED, "This connector does not support dropping schemas");
}

@Override
protected void dropTable(ConnectorSession session, RemoteTableName remoteTableName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not matching by name. It looks like you could pass the boolean temporaryTable flag explicitly via parameter.

@mwd410 mwd410 force-pushed the oracle-flakey-fte branch from 3e3e45c to 1024391 Compare May 15, 2023 18:25
@mwd410 mwd410 requested a review from losipiuk May 15, 2023 18:26
@losipiuk losipiuk merged commit f1a3447 into trinodb:master May 16, 2023
@github-actions github-actions bot added this to the 418 milestone May 16, 2023
@mwd410 mwd410 deleted the oracle-flakey-fte branch May 16, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants